<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>首页图片查看</title>
<script type="text/javascript" src="<%=basePath%>skin/js/jquery-1.9.1.min.js"></script>
</head>

<body>
	<table width="98%" class="input tabContent">
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">类型：</td>
			<td class="tdLeft">
				${indexImage.typeLabel}
			</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">排序：</td>
			<td class="tdLeft">${indexImage.orders }</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">标题：</td>
			<td class="tdLeft">${indexImage.title }</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">图片：</td>
			<td class="tdLeft">
				<c:if test="${not empty indexImage.source}">
					<c:choose>
		        	<c:when test="${fn:containsIgnoreCase(indexImage.url, 'http://') }">
		        		<a href="${indexImage.url}" target="_blank"><img src="<%=basePath%>download.shtml?filepath=${indexImage.source}" width="80" height="50" title="${indexImage.title}"/></a>
		        	</c:when>
		        	<c:otherwise>
		        		<a href="<%=basePath%>${indexImage.url}" target="_blank"><img src="<%=basePath%>download.shtml?filepath=${indexImage.source}" width="80" height="50" title="${indexImage.title}"/></a>
		        	</c:otherwise>
		        	</c:choose>			  			
	  			</c:if>
			</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">网址：</td>
			<td class="tdLeft">${indexImage.url }</td>
		</tr>
	</table>
	<table width="98%">
		<tr bgcolor="#EEF4EA">
			<td height="36" colspan="10">
				<input type="button" value="返回" class="button" onclick="location.href='<%=basePath%>admin/indexImage/list.shtml'" />
			</td>
		</tr>
	</table>
</body>
</html>
